package no.ntnu.idi.deid.searchresultunits;

public enum Tag {
	
	//medical dictionaries - insensitive 
	ICD10(false, 0),
	ICPC2(false, 0),
	NCSP(false, 0),
	SNOMED(false, 0),
	FELLESKATALOGEN(false, 0),
	ATC(false, 0),
	MEDICALKEYWORD(false, 0),
	MEDICAMENT(false, 0),
	DOSE(false,0),
	DOSE_UNIT(false,0),
	MEDICAMENT_PHRASE(false,0),
	ELEMENT(false,0),
	NCMP(false,0),
	NCRP(false,0),
	MESH(false,0),
	
	//PHI - sensitive
	NAME(true, 0),
	NATIONALIDENTITYNUMBER(true, 0),
	ORGANIZATIONNUMBER(true, 0),
	ORGANIZATIONNAME(true, 0),
	DATE(true, 0),
	ADDRESS(true, 0),
	ZIPCODE(true, 0),
	TLFNUMBER(true, 0),
	PATIENTNUMBER(true, 0),
	BANKACCOUNTNUMBER(true, 0),
	DRIVERSLICENSENUMBER(true, 0),
	CARREGISTRATIONNUMBER(true, 0),
	MAILADDRESS(true, 0),
	BIOMETRICCHARACTRESTIC(true, 0),
	RELIGION(true, 0),
	SEXUALRELATION(true, 0),
	WEBURL(true, 0),
	GEOGRAPHICRELATION(true, 0),
	TIME(true, 0),
	NATIONALITY(true,0),
	YEAR(true,0),
	SPECIALDAY(true,0),
	MONTH(true,0),
	PART(true,0),
	
	//Various - insensitive
	VARIOUS(false,0),
	TF_IDF(false,0),
	SENTENCE_TF_IDF(false,0),
	
	//Various - sensivitve - temp
	SENSVARIOUS(true,0),
	SENSITIVE_SENTENCE(true,0),
	NUMERAL(true,0),
	IDF_SENSITIVE(true,0);
	
	
	Tag(boolean isSens, int sensRate) {
		isSensitive = isSens;
		sensitivityRate = sensRate;
	}
	
	private boolean isSensitive;
	private int sensitivityRate;
	
	public boolean isSensitive() {
		return isSensitive;
	}
	
	
	public static Tag getCategoryTagByString(String str){
		Tag[] tags = Tag.values();
		for(Tag ct: tags){
			if(ct.toString().equals(str.toUpperCase())){return ct;}
		}
		System.err.println("CategoryTag.Java: ERROR, couldn't find tag: "+str);
		return null;
	}


	public int getSensitivityRate() {
		return sensitivityRate;
	}
}
